package com.codejam.pagehelper.starter.controller;

import com.codejam.pagehelper.starter.dal.dataobject.User;
import com.codejam.pagehelper.starter.service.interfaces.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/user")
@RestController
public class UserController {

    @Autowired
    private IUserService userService;

    @GetMapping("/getUserList")
    public List<User> getUserList() {

        return userService.getUserList();
    }

    @GetMapping("/getRandomString")
    public String getRandomString() {

        return userService.getRandomString();
    }
}
